package com.xdf.ecommerce.goods;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * @author chanchaw
 * @create 2025-10-27 21:54
 */
@ApiModel(description = "商品信息")
@Data
@NoArgsConstructor
@AllArgsConstructor
public class GoodsInfo implements Serializable {
    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "商品表主键")
    private Long id;
    @ApiModelProperty(value = "商品分类")
    private String goodsCategory;
    @ApiModelProperty(value = "品牌分类")
    private String brandCategory;
    @ApiModelProperty(value = "品名")
    private String goodsName;
    @ApiModelProperty(value = "商品图片")
    private String goodsPic;
    @ApiModelProperty(value = "商品描述")
    private String goodsDescription;
    @ApiModelProperty(value = "商品状态")
    private Integer goodsStatus;
    @ApiModelProperty(value = "商品价格")
    private Integer price;
    @ApiModelProperty(value = "商品属性")
    private GoodsProperty goodsProperty;
    @ApiModelProperty(value = "总供应量")
    private Long supply;
    @ApiModelProperty(value = "商品库存")
    private Long inventory;
    @ApiModelProperty(value = "创建事件")
    private LocalDateTime createTime;
    @ApiModelProperty(value = "最后一次修改时间")
    private LocalDateTime updateTime;
    @ApiModelProperty(value = "创建人")
    private String createUser;
    @ApiModelProperty(value = "最后一次修改人")
    private String updateUser;

    @ApiModel("商品属性")
    @Data
    @NoArgsConstructor
    @AllArgsConstructor
    public static class GoodsProperty {
        @ApiModelProperty(value = "尺寸")
        private String size;
        @ApiModelProperty(value = "颜色")
        private String color;
        @ApiModelProperty(value = "材质")
        private String material;

    }
}
